# -*- coding: utf-8 -*-
"""
Created on Fri Jul 12 17:49:39 2013

@author: Maxim
"""
import sys
from PyQt4 import QtGui
from main_window import Ui_MainWindow

class Example(QtGui.QWidget):
    
    def __init__(self):
        super(Example, self).__init__()
        
        self.initUI()
    def initUI(self):      

        self.btn = QtGui.QPushButton('Dialog', self)
        self.btn.move(20, 20)
        self.btn.clicked.connect(self.showDialog)
        
        self.le = QtGui.QLineEdit(self)
        self.le.move(130, 22)
        
        self.setGeometry(500, 500, 500, 500)
        self.setWindowTitle('Input dialog')
        
        self.tab1 = QtGui.QTabBar(self)
        self.tab1.setGeometry(50,50,150,150)
        self.tab1.addTab('Wing')
        self.tab1.addTab('Body')
        self.tab1.setTabText(0,'Wing')
        self.show()
        
    def showDialog(self):
        
        text, ok = QtGui.QInputDialog.getText(self, 'Input Dialog', 
            'Enter your name:')
        
        if ok:
            self.le.setText(str(text))
        
def main():
    
    app = QtGui.QApplication(sys.argv)
    ex = Example()
    sys.exit(app.exec_())


if __name__ == '__main__':
    main()